import http from '@/api/request.js'

export default function () {
  return {
    /**
     * @description 获取文章列表
     */
    getArticlelist: () => {
      return http.post('/backend/admin/article/list')
    },
    /**
     * @description 删除文章
     */
    deleteArticle: (data) => {
      return http.post('/backend/admin/article/delete', data)
    },
    /**
     * @description 添加文章
     */
    addArticle: (data) => {
      console.log(data)
      return (
        http.post('/backend/admin/article/create',data)
      )
    }
  }
}
